package com.shuoyue.ycgk.ui.papergroups.groupcommon;

import android.os.Bundle;

import com.shuoyue.ycgk.entity.PaperSet;
import com.shuoyue.ycgk.entity.Type;
import com.shuoyue.ycgk.ui.papergroups.BaseFragmentPaperGroup;
import com.shuoyue.ycgk.ui.papergroups.realpaper.RealPaperInfoActivity;

public class FragmentCommonPaper extends BaseFragmentPaperGroup {

    @Override
    protected void onItemClick(PaperSet paperSet) {
        PaperCommonInfoActivity.start(mActivity, paperSet.getId(), queryType, type.getSubjectTypeId());
    }


    public static FragmentCommonPaper getInstance(Type type, boolean isMine, int queryType) {
        FragmentCommonPaper fragment = new FragmentCommonPaper();
        fragment.title = type.getName();
        Bundle bundle = new Bundle();
        bundle.putSerializable("type", type);
        bundle.putBoolean("isMine", isMine);
        bundle.putInt("queryType", queryType);

        fragment.setArguments(bundle);
        return fragment;
    }


}
